import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'


//引入登录页
import Login from '@/views/Login'
//引入注册页
import Register from '@/views/Register'
//引入个人中心页
import PersonIndex from '../views/personalcentre/Index.vue'
// 引入编辑资料页
import Editdata from '../views/personalcentre/Editdata.vue'
// 引入我的关注页
import Myfocus from '../views/personalcentre/Myfocus.vue'
// 引入我的收藏页
import Mycollect from '../views/personalcentre/Mycollect.vue'
// 引入文章详情页
import Particulars from '../views/Particulars.vue'
// 引入更多跟帖
import MoreComments from '../views/MoreComments.vue'
//引入我的跟帖页
import Myfollowup from '../views/personalcentre/Myfollowup.vue'
// 引入搜索页
import Search from '../views/Search.vue'
// 引入栏目管理
import Manage from '../views/personalcentre/Manage.vue'
// 测试页
import Test from '../views/Test.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/login',
    name: 'LoginPage',
    component: Login
  },
  {
    path: '/register',
    name: 'RegisterPage',
    component: Register
  },
  {
    path: '/person',
    name: 'PersonIndexPage',
    component: PersonIndex
  },
  {
    path: '/edit',
    name: 'EditdataPage',
    component: Editdata
  },
  {
    path: '/focus',
    name: 'MyfocusPage',
    component: Myfocus
  },
  {
    path: '/collect',
    name: 'mycollectPage',
    component: Mycollect
  },
  {
    path: '/particulars',
    name: 'particularsPage',
    component: Particulars
  },
  {
    path: '/moreComments',
    name: 'moreCommentspage',
    component: MoreComments
  },
  {
    path: '/followup',
    name: 'myfollowupPage',
    component: Myfollowup
  },
  {
    path: '/search',
    component: Search
  },
  {
    path: '*',
    component: Home
  },
  {
    path: '/manage',
    name: 'ManagePage',
    component: Manage
  },
  {
    path: '/test',
    component: Test
  }


]

const router = new VueRouter({
  routes
})

export default router
